package com.aboat.view;

import com.aboat.action.*;

import javax.swing.*;

/**
 * 控制菜单
 *
 * @author aboat
 * @email clear_windy@yeah.net
 * @create 2017-04-08 22:43
 */
public class ControlMenu extends JMenuBar{
    public ControlMenu() {
        JButton startButton = new JButton("启动");
        JButton pauseButton = new JButton("暂停");
        JButton quitButton = new JButton("退出");
        JButton loadButton = new JButton("加载配置");
        JButton illustrationButton = new JButton("使用说明");
        JButton aboutButton = new JButton("关于");
        JButton registerButton = new JButton("注册");

        startButton.addActionListener(new StartListener(startButton));
        pauseButton.addActionListener(new PauseListener());
        quitButton.addActionListener(new QuitListener());
        loadButton.addActionListener(new LoadListener());
        illustrationButton.addActionListener(new IllustrationListener());
        aboutButton.addActionListener(new AboutListener());
        registerButton.addActionListener(new RegisterListener());

        this.add(startButton);
        this.add(pauseButton);
        this.add(quitButton);
        this.add(loadButton);
        this.add(illustrationButton);
        this.add(aboutButton);
        this.add(registerButton);
    }
}
